package com.cn.goodsadmin.dao;



import com.cn.goodsadmin.common.PageQueryResult;
import com.cn.goodsadmin.po.Words;

import java.util.List;

public interface IWordsDao {

    /**
     * 更新操作
     *
     * @param t
     */
    void update(Words t) throws Exception;

    /**
     * 删除操作
     *
     * @param t
     */
    void delete(Words t) throws Exception;

    /**
     * 增加操作
     *
     * @param t
     */
    void save(Words t) throws Exception;

    Words findWordsByMsgId(String msgId)throws Exception;

    PageQueryResult<DestDTO> findAllWordsbyAppid(int pageindex, int pagesize,String  wxnumber)throws Exception;


    /**
     * 过滤某个用户的留言
     * @param pageindex
     * @param pagesize
     * @param wxnumber
     * @param openid
     * @return
     * @throws Exception
     */
    PageQueryResult<DestDTO> findAllWordsbyAppidAndOpenId(int pageindex, int pagesize, String  wxnumber, String openid)throws Exception;


    /**
     * 查找回复
     * @param words
     * @return
     * @throws Exception
     */
    List<Words> findCallBackWords(Words words)throws Exception;

    /**
     * 找到用户的最新一次回复
     * @param openid
     * @param wxnumber
     * @return
     * @throws Exception
     */
    Words   findLastUserCallBack(String openid,String  wxnumber) throws Exception;
}
